class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: F = None
        self.s: H = None
        self.o: H = None
        self.z: F = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.p: C = None
        self.s: B = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: F = None
        self.s: H = None
        self.o: H = None
        self.z: F = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.p: C = None
        self.s: B = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.txt = txt

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

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