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

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: F = None
        self.z: B = None
        self.t: G = None
        self.w: F = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: E = None
        self.o: B = None
        self.txt = txt

k = A("k")
n = B("n")
c = C("c")
m = D("m")
l = E("l")
j = F("j")
f = G("f")
d = C("d")
i = F("i")
b = D("b")

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: F = None
        self.z: B = None
        self.t: G = None
        self.w: F = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: E = None
        self.o: B = None
        self.txt = txt

k = A("k")
n = B("n")
c = C("c")
m = D("m")
l = E("l")
j = F("j")
f = G("f")
d = C("d")
i = F("i")
b = D("b")

k.x = l
n.o = k
c.p = l
c.u = d
c.t = d
c.s = k
c.y = k
m.o = b
m.s = j
m.w = j
m.z = n
m.y = n
m.t = f
l.x = b
j.y = k
j.z = k
j.q = n
f.q = l
f.y = l
f.o = n
d.p = l
d.u = c
d.t = c
d.s = k
d.y = k
i.y = k
i.z = k
i.q = n
b.o = m
b.s = i
b.w = i
b.z = n
b.y = n
b.t = f
assert f.y.x.y.o.x.x.z.txt == "n"