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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: H = None
        self.u: A = None
        self.s: A = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: H = None
        self.u: A = None
        self.s: A = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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