class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: C = None
        self.u: G = None
        self.q: F = None
        self.v: C = None
        self.t: H = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.x: G = None
        self.r: G = None
        self.q: B = None
        self.p: E = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.x: G = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.y: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.v: C = None
        self.o: D = None
        self.txt = txt

g = A("g")
i = B("i")
h = C("h")
d = D("d")
m = E("m")
l = F("l")
n = G("n")
k = H("k")
a = E("a")

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.x: G = None
        self.r: G = None
        self.q: B = None
        self.p: E = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.x: G = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.y: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.v: C = None
        self.o: D = None
        self.txt = txt

g = A("g")
i = B("i")
h = C("h")
d = D("d")
m = E("m")
l = F("l")
n = G("n")
k = H("k")
a = E("a")

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