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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: G = None
        self.u: G = None
        self.s: D = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: E = None
        self.o: D = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: G = None
        self.u: G = None
        self.s: D = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: E = None
        self.o: D = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.txt = txt

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

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

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