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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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