class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: F = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: H = None
        self.u: D = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

d = A("d")
j = B("j")
e = C("e")
a = D("a")
b = E("b")
i = F("i")
g = G("g")
c = H("c")
n = I("n")
m = B("m")

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: F = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: H = None
        self.u: D = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

d = A("d")
j = B("j")
e = C("e")
a = D("a")
b = E("b")
i = F("i")
g = G("g")
c = H("c")
n = I("n")
m = B("m")

d.p = g
d.u = e
d.x = b
d.z = i
j.u = b
j.p = n
j.w = n
e.x = j
a.s = d
a.y = e
a.p = m
b.z = m
b.v = i
b.u = e
i.t = n
i.z = n
i.r = e
i.w = e
i.v = m
i.y = j
i.p = b
g.w = b
g.p = b
g.o = m
c.z = g
c.x = i
n.v = j
n.z = c
n.u = a
n.y = a
n.r = b
m.u = b
m.p = n
m.w = n
assert j.p.z.x.z.z.x.p.u.txt == "e"