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

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

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

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

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

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

k = A("k")
f = B("f")
g = C("g")
c = D("c")
i = E("i")
n = F("n")
m = C("m")
e = B("e")

k.w = e
k.y = m
f.r = n
f.t = n
f.p = i
f.u = i
f.q = i
g.s = e
c.r = m
c.t = e
c.v = n
i.s = f
i.r = e
i.y = n
i.o = n
i.w = k
i.x = m
n.q = f
n.v = i
n.w = m
m.s = f
e.r = n
e.t = n
e.p = i
e.u = i
e.q = i
assert c.t.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

k = A("k")
f = B("f")
g = C("g")
c = D("c")
i = E("i")
n = F("n")
m = C("m")
e = B("e")

k.w = e
k.y = m
f.r = n
f.t = n
f.p = i
f.u = i
f.q = i
g.s = e
c.r = m
c.t = e
c.v = n
i.s = f
i.r = e
i.y = n
i.o = n
i.w = k
i.x = m
n.q = f
n.v = i
n.w = m
m.s = f
e.r = n
e.t = n
e.p = i
e.u = i
e.q = i
assert c.t.t.v.txt == "i"