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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: E = None
        self.u: B = None
        self.w: E = None
        self.v: H = None
        self.r: I = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: A = None
        self.u: I = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: E = None
        self.u: B = None
        self.w: E = None
        self.v: H = None
        self.r: I = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: A = None
        self.u: I = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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