class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: G = None
        self.p: F = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: E = None
        self.x: G = None
        self.o: A = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.p: A = None
        self.u: C = None
        self.r: F = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.r: B = None
        self.z: C = None
        self.x: E = None
        self.t: D = None
        self.txt = txt

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

l = A("l")
g = B("g")
h = C("h")
n = D("n")
f = E("f")
j = F("j")
k = G("k")

l.r = n
l.v = n
l.t = k
l.p = j
l.z = f
g.s = l
h.w = k
h.x = k
h.t = f
h.o = l
h.p = j
n.o = j
n.u = k
f.y = n
f.t = j
f.r = j
f.p = l
f.v = l
f.u = h
f.w = k
j.s = l
j.w = g
j.r = g
j.z = h
j.x = f
j.t = n
k.v = f
assert f.v.p.r.s.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: G = None
        self.p: F = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: E = None
        self.x: G = None
        self.o: A = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.p: A = None
        self.u: C = None
        self.r: F = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.r: B = None
        self.z: C = None
        self.x: E = None
        self.t: D = None
        self.txt = txt

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

l = A("l")
g = B("g")
h = C("h")
n = D("n")
f = E("f")
j = F("j")
k = G("k")

l.r = n
l.v = n
l.t = k
l.p = j
l.z = f
g.s = l
h.w = k
h.x = k
h.t = f
h.o = l
h.p = j
n.o = j
n.u = k
f.y = n
f.t = j
f.r = j
f.p = l
f.v = l
f.u = h
f.w = k
j.s = l
j.w = g
j.r = g
j.z = h
j.x = f
j.t = n
k.v = f
assert f.v.p.r.s.r.txt == "n"