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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: F = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.p: G = None
        self.t: C = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.x: I = None
        self.u: G = None
        self.r: C = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: D = None
        self.t: H = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

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

f = A("f")
m = B("m")
c = C("c")
g = D("g")
a = E("a")
e = F("e")
j = G("j")
b = H("b")
k = I("k")

f.q = b
f.u = c
f.s = j
m.y = k
m.u = e
m.r = c
c.u = m
c.p = e
c.t = k
g.y = c
g.t = c
g.w = c
g.s = f
g.p = j
g.u = e
a.x = b
a.p = f
a.t = e
a.o = m
a.s = m
e.v = c
e.r = c
e.s = c
e.y = j
e.u = j
e.x = k
e.t = a
j.y = f
j.s = f
j.z = g
j.t = b
j.p = a
b.z = g
b.t = f
b.o = k
k.u = m
k.y = g
assert g.p.t.t.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: C = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: F = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.p: G = None
        self.t: C = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.x: I = None
        self.u: G = None
        self.r: C = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: D = None
        self.t: H = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

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

f = A("f")
m = B("m")
c = C("c")
g = D("g")
a = E("a")
e = F("e")
j = G("j")
b = H("b")
k = I("k")

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