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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.r: E = None
        self.u: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.r: E = None
        self.u: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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

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