class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: I = None
        self.o: J = None
        self.p: E = None
        self.q: C = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: A = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: I = None
        self.t: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: D = None
        self.u: B = None
        self.r: B = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: A = None
        self.x: A = None
        self.s: C = None
        self.t: D = None
        self.y: D = None
        self.v: C = None
        self.p: C = None
        self.u: E = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: C = None
        self.y: G = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: J = None
        self.r: H = None
        self.s: E = None
        self.u: D = None
        self.y: G = None
        self.x: G = None
        self.p: F = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.u: A = None
        self.r: G = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: A = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: I = None
        self.t: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: D = None
        self.u: B = None
        self.r: B = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: A = None
        self.x: A = None
        self.s: C = None
        self.t: D = None
        self.y: D = None
        self.v: C = None
        self.p: C = None
        self.u: E = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: C = None
        self.y: G = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: J = None
        self.r: H = None
        self.s: E = None
        self.u: D = None
        self.y: G = None
        self.x: G = None
        self.p: F = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.u: A = None
        self.r: G = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

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

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