class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: F = None
        self.p: G = None
        self.x: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.y: B = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.r: B = None
        self.z: F = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

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

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

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

b.z = c
b.r = a
b.p = k
b.x = h
g.z = c
f.q = k
f.z = c
f.o = c
f.y = g
c.s = l
c.y = f
l.u = n
l.t = k
l.q = k
l.r = g
l.z = a
l.y = h
a.p = n
k.s = a
k.r = f
k.q = f
n.p = a
i.z = c
h.z = c
h.r = a
h.p = k
h.x = b
assert b.x.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: F = None
        self.p: G = None
        self.x: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.y: B = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.r: B = None
        self.z: F = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

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

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

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

b.z = c
b.r = a
b.p = k
b.x = h
g.z = c
f.q = k
f.z = c
f.o = c
f.y = g
c.s = l
c.y = f
l.u = n
l.t = k
l.q = k
l.r = g
l.z = a
l.y = h
a.p = n
k.s = a
k.r = f
k.q = f
n.p = a
i.z = c
h.z = c
h.r = a
h.p = k
h.x = b
assert b.x.x.p.txt == "k"