class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: D = None
        self.r: F = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: E = None
        self.v: A = None
        self.z: A = None
        self.x: H = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.r: F = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: E = None
        self.v: A = None
        self.z: A = None
        self.x: H = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.r: F = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

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

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