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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.t: J = None
        self.r: F = None
        self.x: C = None
        self.q: F = None
        self.u: H = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: J = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: J = None
        self.u: B = None
        self.y: A = None
        self.t: E = None
        self.s: I = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: I = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: H = None
        self.p: H = None
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: F = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: H = None
        self.t: H = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.t: J = None
        self.r: F = None
        self.x: C = None
        self.q: F = None
        self.u: H = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: J = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: J = None
        self.u: B = None
        self.y: A = None
        self.t: E = None
        self.s: I = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: I = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: H = None
        self.p: H = None
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: F = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: H = None
        self.t: H = None
        self.v: C = None
        self.txt = txt

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

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