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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: D = None
        self.s: D = None
        self.z: A = None
        self.v: D = None
        self.txt = txt

a = A("a")
d = B("d")
i = C("i")
c = D("c")
k = E("k")
n = F("n")
b = G("b")
e = B("e")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: D = None
        self.s: D = None
        self.z: A = None
        self.v: D = None
        self.txt = txt

a = A("a")
d = B("d")
i = C("i")
c = D("c")
k = E("k")
n = F("n")
b = G("b")
e = B("e")

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