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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: F = None
        self.w: H = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: H = None
        self.u: B = None
        self.y: B = None
        self.x: A = None
        self.p: G = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: F = None
        self.w: H = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: H = None
        self.u: B = None
        self.y: B = None
        self.x: A = None
        self.p: G = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.q: D = None
        self.txt = txt

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

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