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

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

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

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

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

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

b = A("b")
f = B("f")
n = C("n")
c = D("c")
k = E("k")
d = F("d")
l = A("l")
i = C("i")

b.v = f
f.x = k
f.t = c
f.y = i
n.s = c
n.u = c
n.t = f
n.y = f
c.p = f
c.r = k
k.s = d
k.z = i
k.w = b
k.r = f
k.v = f
k.x = c
d.x = f
d.z = c
d.v = c
d.s = l
d.w = k
l.v = f
i.s = c
i.u = c
i.t = f
i.y = f
assert i.t.x.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

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

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

b = A("b")
f = B("f")
n = C("n")
c = D("c")
k = E("k")
d = F("d")
l = A("l")
i = C("i")

b.v = f
f.x = k
f.t = c
f.y = i
n.s = c
n.u = c
n.t = f
n.y = f
c.p = f
c.r = k
k.s = d
k.z = i
k.w = b
k.r = f
k.v = f
k.x = c
d.x = f
d.z = c
d.v = c
d.s = l
d.w = k
l.v = f
i.s = c
i.u = c
i.t = f
i.y = f
assert i.t.x.z.t.txt == "f"