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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: E = None
        self.x: F = None
        self.r: B = None
        self.q: E = None
        self.w: F = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: E = None
        self.x: F = None
        self.r: B = None
        self.q: E = None
        self.w: F = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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