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

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: D = None
        self.o: B = None
        self.s: A = None
        self.x: F = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: D = None
        self.o: B = None
        self.s: A = None
        self.x: F = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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