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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: B = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

j = A("j")
g = B("g")
f = C("f")
b = D("b")
m = E("m")
e = F("e")
n = G("n")
h = G("h")
i = D("i")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: B = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

j = A("j")
g = B("g")
f = C("f")
b = D("b")
m = E("m")
e = F("e")
n = G("n")
h = G("h")
i = D("i")

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