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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: D = None
        self.u: D = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: D = None
        self.u: D = None
        self.r: F = None
        self.txt = txt

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

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