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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: F = None
        self.y: E = None
        self.o: D = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.p: A = None
        self.o: D = None
        self.txt = txt

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

l = A("l")
h = B("h")
e = C("e")
c = D("c")
k = E("k")
n = F("n")
g = D("g")
b = B("b")

l.u = e
l.x = k
l.v = n
l.z = h
l.w = c
h.r = k
h.y = k
h.u = n
h.x = n
h.o = g
h.v = g
e.p = c
e.r = k
c.y = l
k.q = l
k.p = l
k.u = e
k.o = c
n.s = g
n.z = g
g.y = l
b.r = k
b.y = k
b.u = n
b.x = n
b.o = c
b.v = c
assert h.u.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: E = None
        self.v: F = None
        self.z: B = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: F = None
        self.y: E = None
        self.o: D = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.p: A = None
        self.o: D = None
        self.txt = txt

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

l = A("l")
h = B("h")
e = C("e")
c = D("c")
k = E("k")
n = F("n")
g = D("g")
b = B("b")

l.u = e
l.x = k
l.v = n
l.z = h
l.w = c
h.r = k
h.y = k
h.u = n
h.x = n
h.o = g
h.v = g
e.p = c
e.r = k
c.y = l
k.q = l
k.p = l
k.u = e
k.o = c
n.s = g
n.z = g
g.y = l
b.r = k
b.y = k
b.u = n
b.x = n
b.o = c
b.v = c
assert h.u.z.y.txt == "l"