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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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