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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: G = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.u: D = None
        self.q: C = None
        self.x: B = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.s: B = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: G = None
        self.w: A = None
        self.s: D = None
        self.t: B = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: G = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.u: D = None
        self.q: C = None
        self.x: B = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.s: B = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: G = None
        self.w: A = None
        self.s: D = None
        self.t: B = None
        self.z: B = None
        self.txt = txt

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

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

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

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