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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.x: B = None
        self.u: F = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: B = None
        self.q: B = None
        self.s: D = None
        self.txt = txt

j = A("j")
c = B("c")
m = C("m")
e = D("e")
g = E("g")
a = F("a")
l = D("l")
d = A("d")
f = B("f")

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.x: B = None
        self.u: F = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: B = None
        self.q: B = None
        self.s: D = None
        self.txt = txt

j = A("j")
c = B("c")
m = C("m")
e = D("e")
g = E("g")
a = F("a")
l = D("l")
d = A("d")
f = B("f")

j.v = c
j.w = l
j.p = l
j.t = f
c.y = d
c.t = g
m.r = j
m.z = f
m.x = c
m.u = a
m.t = g
m.y = g
e.u = m
e.s = j
e.y = l
g.r = l
a.y = j
a.o = c
a.q = c
a.s = e
l.u = m
l.s = j
l.y = e
d.v = f
d.t = f
d.w = l
d.p = l
f.y = j
f.t = g
assert j.p.u.u.y.txt == "j"