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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: B = None
        self.z: D = None
        self.u: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: B = None
        self.z: D = None
        self.u: D = None
        self.o: D = None
        self.txt = txt

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

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

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

e.q = d
e.t = d
e.s = b
a.u = h
a.s = c
a.z = i
b.t = d
d.v = k
d.y = k
d.o = k
d.s = i
d.z = j
d.w = b
d.p = a
c.y = b
c.w = a
c.z = d
c.u = d
c.o = d
i.v = f
h.s = j
h.t = j
h.o = d
h.y = d
h.u = d
h.w = i
k.q = d
k.t = d
k.s = b
j.s = h
j.t = h
j.o = d
j.y = d
j.u = d
j.w = f
f.v = i
assert e.t.w.t.s.v.v.v.v.v.txt == "f"