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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: A = None
        self.r: C = None
        self.s: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: A = None
        self.p: G = None
        self.u: A = None
        self.w: A = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: A = None
        self.s: G = None
        self.r: D = None
        self.v: F = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: A = None
        self.r: C = None
        self.s: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: A = None
        self.p: G = None
        self.u: A = None
        self.w: A = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: A = None
        self.s: G = None
        self.r: D = None
        self.v: F = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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