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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: C = None
        self.w: D = None
        self.u: H = None
        self.y: C = None
        self.t: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: C = None
        self.w: D = None
        self.u: H = None
        self.y: C = None
        self.t: A = None
        self.p: A = None
        self.txt = txt

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

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

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