class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: G = None
        self.u: B = None
        self.r: D = None
        self.t: G = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.w: A = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: E = None
        self.q: C = None
        self.w: C = None
        self.u: G = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: A = None
        self.t: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.w: A = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: E = None
        self.q: C = None
        self.w: C = None
        self.u: G = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: A = None
        self.t: E = None
        self.txt = txt

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

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

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