class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: A = None
        self.z: I = None
        self.r: I = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: F = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: F = None
        self.w: I = None
        self.y: H = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: A = None
        self.y: G = None
        self.w: B = None
        self.r: F = None
        self.u: I = None
        self.z: B = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.w: F = None
        self.o: E = None
        self.v: B = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: A = None
        self.z: I = None
        self.r: I = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: F = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: F = None
        self.w: I = None
        self.y: H = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: A = None
        self.y: G = None
        self.w: B = None
        self.r: F = None
        self.u: I = None
        self.z: B = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.w: F = None
        self.o: E = None
        self.v: B = None
        self.r: D = None
        self.txt = txt

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

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