class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.z: F = None
        self.o: B = None
        self.r: C = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: F = None
        self.q: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: E = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: F = None
        self.q: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: E = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

l.p = m
l.v = b
l.z = c
l.u = c
l.o = k
l.r = n
l.x = n
k.x = i
k.y = i
k.o = c
k.q = d
n.r = b
n.x = b
n.y = l
n.u = m
d.y = b
b.y = l
c.s = d
c.q = m
c.x = b
c.r = n
c.p = n
m.r = k
i.p = m
i.v = b
i.z = c
i.u = c
i.o = k
i.r = n
i.x = n
assert k.y.v.y.z.r.y.txt == "l"