class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: H = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.v: C = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: C = None
        self.t: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: A = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: H = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.v: C = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: C = None
        self.t: A = None
        self.q: B = None
        self.txt = txt

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

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