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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: C = None
        self.s: G = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: D = None
        self.q: G = None
        self.o: F = None
        self.z: A = None
        self.r: D = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.x: C = None
        self.r: C = None
        self.u: A = None
        self.w: H = None
        self.s: A = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: C = None
        self.s: G = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: D = None
        self.q: G = None
        self.o: F = None
        self.z: A = None
        self.r: D = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.x: C = None
        self.r: C = None
        self.u: A = None
        self.w: H = None
        self.s: A = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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