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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.u: B = None
        self.v: 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.y: E = None
        self.txt = txt

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

i = A("i")
l = B("l")
m = C("m")
g = D("g")
a = E("a")
n = F("n")
d = D("d")
j = A("j")
k = E("k")
b = B("b")

i.x = m
l.y = j
l.v = j
l.w = i
l.z = b
l.q = n
l.p = m
m.o = n
m.q = d
m.u = b
m.v = k
g.y = j
a.y = k
n.w = g
n.o = m
d.y = j
j.x = m
k.y = a
b.y = j
b.w = i
b.v = i
b.z = l
b.q = n
b.p = m
assert i.x.v.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.u: B = None
        self.v: 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.y: E = None
        self.txt = txt

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

i = A("i")
l = B("l")
m = C("m")
g = D("g")
a = E("a")
n = F("n")
d = D("d")
j = A("j")
k = E("k")
b = B("b")

i.x = m
l.y = j
l.v = j
l.w = i
l.z = b
l.q = n
l.p = m
m.o = n
m.q = d
m.u = b
m.v = k
g.y = j
a.y = k
n.w = g
n.o = m
d.y = j
j.x = m
k.y = a
b.y = j
b.w = i
b.v = i
b.z = l
b.q = n
b.p = m
assert i.x.v.y.y.y.y.txt == "k"