class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: C = None
        self.y: F = None
        self.u: B = None
        self.w: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: D = None
        self.t: D = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: A = None
        self.s: B = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.v: B = None
        self.q: G = None
        self.p: G = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.o: B = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: C = None
        self.y: F = None
        self.u: B = None
        self.w: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: D = None
        self.t: D = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: A = None
        self.s: B = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.v: B = None
        self.q: G = None
        self.p: G = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.o: B = None
        self.s: F = None
        self.txt = txt

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

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