class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: H = None
        self.p: E = None
        self.r: B = None
        self.s: B = None
        self.x: H = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: D = None
        self.o: H = None
        self.q: H = None
        self.w: D = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: A = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: E = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: H = None
        self.p: E = None
        self.r: B = None
        self.s: B = None
        self.x: H = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: D = None
        self.o: H = None
        self.q: H = None
        self.w: D = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: A = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: E = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

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