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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.u: F = None
        self.x: H = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.t: B = None
        self.u: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.u: F = None
        self.x: H = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.t: B = None
        self.u: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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