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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: G = None
        self.u: G = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: H = None
        self.u: A = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: G = None
        self.u: G = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: H = None
        self.u: A = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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