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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.o: F = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

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

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

j = A("j")
i = B("i")
n = C("n")
d = D("d")
l = E("l")
f = F("f")
g = G("g")

j.z = d
j.p = g
j.o = g
j.t = g
j.y = g
j.u = l
i.z = j
i.x = n
i.s = d
n.v = l
n.p = d
n.u = i
n.r = i
n.t = i
n.x = g
n.z = j
d.y = l
d.u = l
d.o = f
d.r = j
l.o = i
l.s = i
l.t = j
l.w = d
f.s = d
g.x = n
assert d.o.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: G = None
        self.u: E = None
        self.o: G = None
        self.t: G = None
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.o: F = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

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

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

j = A("j")
i = B("i")
n = C("n")
d = D("d")
l = E("l")
f = F("f")
g = G("g")

j.z = d
j.p = g
j.o = g
j.t = g
j.y = g
j.u = l
i.z = j
i.x = n
i.s = d
n.v = l
n.p = d
n.u = i
n.r = i
n.t = i
n.x = g
n.z = j
d.y = l
d.u = l
d.o = f
d.r = j
l.o = i
l.s = i
l.t = j
l.w = d
f.s = d
g.x = n
assert d.o.s.y.txt == "l"