class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: F = None
        self.y: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.y: A = None
        self.w: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.y: A = None
        self.w: C = None
        self.x: C = None
        self.txt = txt

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

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