class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: C = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: G = None
        self.q: A = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: D = None
        self.w: H = None
        self.y: H = None
        self.o: I = None
        self.v: H = None
        self.x: E = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: F = None
        self.s: E = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: A = None
        self.z: G = None
        self.t: D = None
        self.v: H = None
        self.y: F = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

b = A("b")
g = B("g")
l = C("l")
j = D("j")
d = E("d")
n = F("n")
f = G("f")
a = H("a")
e = I("e")

b.q = f
b.o = d
g.w = d
l.z = e
l.s = f
j.u = f
j.p = l
j.r = g
d.t = e
d.p = f
d.q = b
d.w = n
n.p = e
n.o = e
n.u = j
n.z = j
n.w = a
n.y = a
n.v = a
n.x = d
f.v = e
f.y = e
f.q = n
f.s = d
f.w = d
a.r = f
e.u = b
e.q = b
e.z = f
e.t = j
e.v = a
e.w = a
e.y = n
e.p = l
assert j.r.w.p.y.u.o.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: C = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: G = None
        self.q: A = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: D = None
        self.w: H = None
        self.y: H = None
        self.o: I = None
        self.v: H = None
        self.x: E = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: F = None
        self.s: E = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: A = None
        self.z: G = None
        self.t: D = None
        self.v: H = None
        self.y: F = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

b = A("b")
g = B("g")
l = C("l")
j = D("j")
d = E("d")
n = F("n")
f = G("f")
a = H("a")
e = I("e")

b.q = f
b.o = d
g.w = d
l.z = e
l.s = f
j.u = f
j.p = l
j.r = g
d.t = e
d.p = f
d.q = b
d.w = n
n.p = e
n.o = e
n.u = j
n.z = j
n.w = a
n.y = a
n.v = a
n.x = d
f.v = e
f.y = e
f.q = n
f.s = d
f.w = d
a.r = f
e.u = b
e.q = b
e.z = f
e.t = j
e.v = a
e.w = a
e.y = n
e.p = l
assert j.r.w.p.y.u.o.t.p.txt == "l"