class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: A = None
        self.q: D = None
        self.y: B = None
        self.p: I = None
        self.w: C = None
        self.v: E = None
        self.s: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.v: D = None
        self.z: F = None
        self.t: F = None
        self.q: B = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.v: D = None
        self.z: F = None
        self.t: F = None
        self.q: B = None
        self.s: B = None
        self.txt = txt

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

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

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