class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.r: D = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: A = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.w: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: A = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: A = None
        self.w: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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