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

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

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

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

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

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

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

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

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

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

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

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

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

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

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