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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.z: I = None
        self.s: G = None
        self.y: I = None
        self.q: H = None
        self.v: G = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.z: I = None
        self.s: G = None
        self.y: I = None
        self.q: H = None
        self.v: G = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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