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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: D = None
        self.t: D = None
        self.y: C = None
        self.p: F = None
        self.o: A = None
        self.txt = txt

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

i = A("i")
n = B("n")
c = C("c")
a = D("a")
l = E("l")
f = F("f")
k = E("k")
b = F("b")
h = D("h")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: D = None
        self.t: D = None
        self.y: C = None
        self.p: F = None
        self.o: A = None
        self.txt = txt

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

i = A("i")
n = B("n")
c = C("c")
a = D("a")
l = E("l")
f = F("f")
k = E("k")
b = F("b")
h = D("h")

i.x = c
n.x = k
n.y = c
c.r = i
c.z = i
c.o = i
c.v = l
c.q = h
a.v = h
a.p = h
a.s = b
a.o = i
a.w = i
a.x = n
l.r = i
l.o = i
l.s = a
l.t = a
l.y = c
l.p = f
f.v = n
f.z = n
f.x = b
f.p = i
f.u = c
k.r = i
k.o = i
k.s = h
k.t = h
k.y = c
k.p = f
b.v = n
b.z = n
b.x = f
b.p = i
b.u = c
h.v = a
h.p = a
h.s = f
h.o = i
h.w = i
h.x = n
assert a.w.x.q.w.txt == "i"