class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: B = None
        self.y: B = None
        self.q: D = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.x: H = None
        self.s: G = None
        self.p: D = None
        self.u: C = None
        self.t: G = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: F = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.x: H = None
        self.s: G = None
        self.p: D = None
        self.u: C = None
        self.t: G = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: F = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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