class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: C = None
        self.p: F = None
        self.z: C = None
        self.y: C = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.p: A = None
        self.r: E = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: E = None
        self.u: B = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.u: A = None
        self.t: F = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.o: H = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: C = None
        self.o: E = None
        self.t: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: F = None
        self.o: G = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.p: A = None
        self.r: E = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: E = None
        self.u: B = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.u: A = None
        self.t: F = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.o: H = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: C = None
        self.o: E = None
        self.t: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: F = None
        self.o: G = None
        self.z: B = None
        self.txt = txt

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

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