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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: C = None
        self.z: G = None
        self.o: B = None
        self.w: C = None
        self.p: I = None
        self.u: A = None
        self.v: F = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.z: B = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: C = None
        self.z: G = None
        self.o: B = None
        self.w: C = None
        self.p: I = None
        self.u: A = None
        self.v: F = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.z: B = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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