class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: E = None
        self.z: I = None
        self.u: F = None
        self.p: G = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

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

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

e.u = i
e.w = h
e.t = h
i.x = n
i.t = b
i.o = b
i.u = l
h.t = i
h.q = b
h.z = k
h.u = l
h.p = f
h.o = n
g.s = i
g.x = b
b.t = e
b.u = k
m.o = b
f.p = g
f.s = n
n.t = i
n.v = k
n.x = k
k.q = e
k.w = i
l.o = b
assert g.x.t.u.x.t.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: E = None
        self.z: I = None
        self.u: F = None
        self.p: G = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

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

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

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