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

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

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

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

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

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

d = A("d")
j = B("j")
l = C("l")
c = D("c")
i = E("i")
a = F("a")

d.v = l
d.w = l
d.y = c
d.r = j
d.s = j
d.u = i
j.p = l
j.r = c
j.u = c
j.o = i
j.w = i
j.t = a
l.q = a
l.z = c
c.w = j
i.w = j
i.u = c
a.v = j
a.p = j
assert c.w.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.r: B = None
        self.w: C = None
        self.u: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

d = A("d")
j = B("j")
l = C("l")
c = D("c")
i = E("i")
a = F("a")

d.v = l
d.w = l
d.y = c
d.r = j
d.s = j
d.u = i
j.p = l
j.r = c
j.u = c
j.o = i
j.w = i
j.t = a
l.q = a
l.z = c
c.w = j
i.w = j
i.u = c
a.v = j
a.p = j
assert c.w.t.v.txt == "j"