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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: H = None
        self.u: C = None
        self.r: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: D = None
        self.y: E = None
        self.o: F = None
        self.s: C = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.txt = txt

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

b.y = i
b.v = i
b.s = c
b.r = m
b.p = j
b.z = j
j.y = f
j.v = b
j.w = i
a.x = k
a.u = k
a.o = c
a.r = f
a.p = f
h.w = j
n.p = k
n.z = i
f.p = i
f.w = c
f.y = c
i.r = j
i.q = m
i.y = n
i.o = f
i.s = k
i.w = h
c.z = f
c.o = k
m.w = j
k.x = a
k.u = a
k.o = c
k.r = f
k.p = f
assert n.z.y.p.o.z.y.z.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: H = None
        self.r: D = None
        self.v: G = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: H = None
        self.u: C = None
        self.r: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: D = None
        self.y: E = None
        self.o: F = None
        self.s: C = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.txt = txt

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

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