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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.x: F = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: H = None
        self.q: A = None
        self.w: F = None
        self.o: A = None
        self.t: H = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: B = None
        self.z: E = None
        self.w: F = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: G = None
        self.r: A = None
        self.u: B = None
        self.z: E = None
        self.x: E = None
        self.s: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.x: F = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: H = None
        self.q: A = None
        self.w: F = None
        self.o: A = None
        self.t: H = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: B = None
        self.z: E = None
        self.w: F = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: G = None
        self.r: A = None
        self.u: B = None
        self.z: E = None
        self.x: E = None
        self.s: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: A = None
        self.txt = txt

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

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

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