class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.o: G = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: E = None
        self.u: D = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.s: B = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: E = None
        self.u: D = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.s: B = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

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