class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: C = None
        self.u: B = None
        self.y: E = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.x: D = None
        self.s: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.q: D = None
        self.y: F = None
        self.v: G = None
        self.r: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.u: C = None
        self.v: B = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.x: D = None
        self.s: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.q: D = None
        self.y: F = None
        self.v: G = None
        self.r: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.u: C = None
        self.v: B = None
        self.y: C = None
        self.txt = txt

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

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