class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: A = None
        self.v: B = None
        self.x: C = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

l = A("l")
h = B("h")
e = C("e")
k = D("k")
c = E("c")
a = F("a")
m = A("m")

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

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

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

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

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

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

l = A("l")
h = B("h")
e = C("e")
k = D("k")
c = E("c")
a = F("a")
m = A("m")

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