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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: C = None
        self.w: B = None
        self.txt = txt

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

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

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