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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: B = None
        self.r: D = None
        self.s: F = None
        self.y: E = None
        self.p: F = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: E = None
        self.y: J = None
        self.u: F = None
        self.r: I = None
        self.v: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: H = None
        self.o: I = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: B = None
        self.r: D = None
        self.s: F = None
        self.y: E = None
        self.p: F = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: E = None
        self.y: J = None
        self.u: F = None
        self.r: I = None
        self.v: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: H = None
        self.o: I = None
        self.u: B = None
        self.txt = txt

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

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