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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: A = None
        self.w: D = None
        self.v: E = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: I = None
        self.v: G = None
        self.s: B = None
        self.r: I = None
        self.o: I = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: A = None
        self.r: H = None
        self.v: C = None
        self.u: A = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.x: C = None
        self.r: G = None
        self.v: E = None
        self.t: C = None
        self.u: B = None
        self.y: E = None
        self.txt = txt

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

h = A("h")
l = B("l")
d = C("d")
g = D("g")
j = E("j")
b = F("b")
e = G("e")
k = H("k")
c = I("c")

h.o = l
h.r = l
h.u = l
h.x = k
h.p = e
h.q = e
h.s = d
l.y = h
l.u = h
l.w = g
l.v = j
l.t = e
d.o = k
g.o = l
j.z = e
j.v = e
j.t = c
j.r = c
j.o = c
j.s = l
j.u = l
j.p = b
b.q = e
b.w = e
b.y = j
b.u = d
e.x = k
e.r = k
e.y = k
e.q = h
e.u = h
e.v = d
k.p = b
k.q = b
k.x = d
k.t = d
k.r = e
k.v = j
k.y = j
k.u = l
c.y = l
assert b.u.o.r.v.o.y.v.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.x: H = None
        self.p: G = None
        self.u: B = None
        self.s: C = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: A = None
        self.w: D = None
        self.v: E = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: I = None
        self.v: G = None
        self.s: B = None
        self.r: I = None
        self.o: I = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: A = None
        self.r: H = None
        self.v: C = None
        self.u: A = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.x: C = None
        self.r: G = None
        self.v: E = None
        self.t: C = None
        self.u: B = None
        self.y: E = None
        self.txt = txt

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

h = A("h")
l = B("l")
d = C("d")
g = D("g")
j = E("j")
b = F("b")
e = G("e")
k = H("k")
c = I("c")

h.o = l
h.r = l
h.u = l
h.x = k
h.p = e
h.q = e
h.s = d
l.y = h
l.u = h
l.w = g
l.v = j
l.t = e
d.o = k
g.o = l
j.z = e
j.v = e
j.t = c
j.r = c
j.o = c
j.s = l
j.u = l
j.p = b
b.q = e
b.w = e
b.y = j
b.u = d
e.x = k
e.r = k
e.y = k
e.q = h
e.u = h
e.v = d
k.p = b
k.q = b
k.x = d
k.t = d
k.r = e
k.v = j
k.y = j
k.u = l
c.y = l
assert b.u.o.r.v.o.y.v.x.r.txt == "e"