class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: F = None
        self.o: F = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.z: F = None
        self.q: F = None
        self.t: G = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: C = None
        self.r: G = None
        self.q: A = None
        self.v: D = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: E = None
        self.v: A = None
        self.o: F = None
        self.t: G = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.z: F = None
        self.q: F = None
        self.t: G = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: C = None
        self.r: G = None
        self.q: A = None
        self.v: D = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: E = None
        self.v: A = None
        self.o: F = None
        self.t: G = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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