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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: J = None
        self.q: E = None
        self.v: J = None
        self.o: I = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: I = None
        self.y: J = None
        self.u: E = None
        self.s: G = None
        self.x: G = None
        self.t: C = None
        self.w: E = None
        self.v: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: I = None
        self.t: C = None
        self.y: E = None
        self.r: B = None
        self.z: I = None
        self.w: H = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: F = None
        self.p: C = None
        self.x: B = None
        self.s: J = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: G = None
        self.z: I = None
        self.u: I = None
        self.r: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: J = None
        self.q: E = None
        self.v: J = None
        self.o: I = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: I = None
        self.y: J = None
        self.u: E = None
        self.s: G = None
        self.x: G = None
        self.t: C = None
        self.w: E = None
        self.v: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: I = None
        self.t: C = None
        self.y: E = None
        self.r: B = None
        self.z: I = None
        self.w: H = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: F = None
        self.p: C = None
        self.x: B = None
        self.s: J = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: G = None
        self.z: I = None
        self.u: I = None
        self.r: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.txt = txt

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

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