class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: C = None
        self.x: B = None
        self.y: C = None
        self.w: C = None
        self.t: D = None
        self.txt = txt

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

k = A("k")
c = B("c")
m = C("m")
g = D("g")
d = E("d")
f = F("f")
n = E("n")
i = E("i")
h = B("h")
l = D("l")

k.o = h
c.q = d
c.y = f
c.v = k
m.u = h
m.q = f
g.z = l
d.o = i
d.s = m
d.y = m
d.w = m
d.x = h
d.t = l
f.v = k
f.q = m
f.u = d
n.o = d
n.s = m
n.y = m
n.w = m
n.x = c
n.t = l
i.o = n
i.s = m
i.y = m
i.w = m
i.x = c
i.t = g
h.q = n
h.y = f
h.v = k
l.z = g
assert i.x.y.u.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: C = None
        self.x: B = None
        self.y: C = None
        self.w: C = None
        self.t: D = None
        self.txt = txt

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

k = A("k")
c = B("c")
m = C("m")
g = D("g")
d = E("d")
f = F("f")
n = E("n")
i = E("i")
h = B("h")
l = D("l")

k.o = h
c.q = d
c.y = f
c.v = k
m.u = h
m.q = f
g.z = l
d.o = i
d.s = m
d.y = m
d.w = m
d.x = h
d.t = l
f.v = k
f.q = m
f.u = d
n.o = d
n.s = m
n.y = m
n.w = m
n.x = c
n.t = l
i.o = n
i.s = m
i.y = m
i.w = m
i.x = c
i.t = g
h.q = n
h.y = f
h.v = k
l.z = g
assert i.x.y.u.x.v.txt == "k"