class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.q: F = None
        self.r: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

a = A("a")
g = B("g")
j = C("j")
d = D("d")
f = E("f")
b = F("b")
c = E("c")
h = C("h")
n = A("n")

a.t = h
a.v = c
a.q = b
a.r = b
a.w = d
g.o = b
g.v = c
j.x = b
d.p = f
d.z = n
d.t = b
d.r = b
d.w = c
d.q = g
f.y = g
f.v = c
f.w = c
f.z = n
f.x = d
f.s = b
b.x = j
b.p = c
b.z = c
b.w = g
b.u = g
b.v = h
c.y = g
c.v = f
c.w = f
c.z = n
c.x = d
c.s = b
h.x = b
n.t = h
n.v = f
n.q = b
n.r = b
n.w = d
assert f.x.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.q: F = None
        self.r: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

a = A("a")
g = B("g")
j = C("j")
d = D("d")
f = E("f")
b = F("b")
c = E("c")
h = C("h")
n = A("n")

a.t = h
a.v = c
a.q = b
a.r = b
a.w = d
g.o = b
g.v = c
j.x = b
d.p = f
d.z = n
d.t = b
d.r = b
d.w = c
d.q = g
f.y = g
f.v = c
f.w = c
f.z = n
f.x = d
f.s = b
b.x = j
b.p = c
b.z = c
b.w = g
b.u = g
b.v = h
c.y = g
c.v = f
c.w = f
c.z = n
c.x = d
c.s = b
h.x = b
n.t = h
n.v = f
n.q = b
n.r = b
n.w = d
assert f.x.z.v.txt == "f"