class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: D = None
        self.z: G = None
        self.w: F = None
        self.p: G = None
        self.q: B = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: A = None
        self.p: G = None
        self.s: A = None
        self.q: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

n = A("n")
l = B("l")
k = C("k")
m = D("m")
j = E("j")
f = F("f")
a = G("a")
d = G("d")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: A = None
        self.p: G = None
        self.s: A = None
        self.q: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

n = A("n")
l = B("l")
k = C("k")
m = D("m")
j = E("j")
f = F("f")
a = G("a")
d = G("d")

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