class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: F = None
        self.t: I = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.w: F = None
        self.u: G = None
        self.p: G = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.z: H = None
        self.p: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: A = None
        self.p: A = None
        self.q: H = None
        self.s: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: B = None
        self.x: H = None
        self.y: G = None
        self.o: A = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

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

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

e.u = b
e.s = j
e.t = i
e.q = l
m.y = h
m.r = f
m.w = j
m.u = b
m.p = b
m.x = k
k.x = j
k.y = j
k.q = j
k.o = h
f.r = e
f.x = e
f.p = e
f.z = l
f.s = j
h.r = i
h.v = e
h.p = e
h.q = l
h.s = b
h.x = f
j.v = l
j.x = l
j.t = m
j.y = b
j.w = b
j.o = e
b.q = j
b.p = j
b.r = k
b.v = h
b.o = i
b.x = m
b.y = m
l.v = i
l.p = j
l.t = b
i.o = h
i.p = h
i.y = k
i.u = b
i.x = e
i.v = m
assert l.p.w.o.v.y.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: F = None
        self.t: I = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.w: F = None
        self.u: G = None
        self.p: G = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.z: H = None
        self.p: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: A = None
        self.p: A = None
        self.q: H = None
        self.s: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: B = None
        self.x: H = None
        self.y: G = None
        self.o: A = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

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

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

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