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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: H = None
        self.s: D = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: H = None
        self.s: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: I = None
        self.r: D = None
        self.q: D = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: E = None
        self.t: B = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: H = None
        self.s: D = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: H = None
        self.s: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: I = None
        self.r: D = None
        self.q: D = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: E = None
        self.t: B = None
        self.z: D = None
        self.txt = txt

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

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