class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.y: C = None
        self.r: C = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.v: F = None
        self.r: E = None
        self.q: F = None
        self.p: F = None
        self.x: F = None
        self.txt = txt

j = A("j")
b = B("b")
c = C("c")
n = D("n")
k = E("k")
l = F("l")
h = G("h")
e = C("e")
f = B("f")
i = C("i")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.y: C = None
        self.r: C = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.v: F = None
        self.r: E = None
        self.q: F = None
        self.p: F = None
        self.x: F = None
        self.txt = txt

j = A("j")
b = B("b")
c = C("c")
n = D("n")
k = E("k")
l = F("l")
h = G("h")
e = C("e")
f = B("f")
i = C("i")

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