class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: F = None
        self.w: D = None
        self.s: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.q: F = None
        self.t: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.x: B = None
        self.r: G = None
        self.u: E = None
        self.t: E = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.q: F = None
        self.t: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.x: B = None
        self.r: G = None
        self.u: E = None
        self.t: E = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

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

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