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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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