class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: G = None
        self.o: E = None
        self.y: B = None
        self.s: D = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: H = None
        self.o: A = None
        self.u: H = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: H = None
        self.o: A = None
        self.u: H = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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