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

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

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

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

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

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

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

g = A("g")
j = B("j")
i = C("i")
e = D("e")
l = E("l")
k = F("k")
h = G("h")
a = D("a")
n = G("n")

g.x = l
j.r = l
j.t = n
j.p = i
j.v = i
j.w = g
i.s = g
i.p = k
i.v = k
i.y = h
i.z = n
e.s = l
e.x = i
l.v = n
l.y = j
k.w = l
k.u = e
k.x = g
k.q = j
h.w = i
h.x = i
h.v = i
h.z = a
h.p = g
h.o = j
h.s = l
a.s = l
a.x = i
n.w = i
n.x = i
n.v = i
n.z = a
n.p = g
n.o = j
n.s = l
assert k.x.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

g = A("g")
j = B("j")
i = C("i")
e = D("e")
l = E("l")
k = F("k")
h = G("h")
a = D("a")
n = G("n")

g.x = l
j.r = l
j.t = n
j.p = i
j.v = i
j.w = g
i.s = g
i.p = k
i.v = k
i.y = h
i.z = n
e.s = l
e.x = i
l.v = n
l.y = j
k.w = l
k.u = e
k.x = g
k.q = j
h.w = i
h.x = i
h.v = i
h.z = a
h.p = g
h.o = j
h.s = l
a.s = l
a.x = i
n.w = i
n.x = i
n.v = i
n.z = a
n.p = g
n.o = j
n.s = l
assert k.x.x.y.txt == "j"