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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.w: B = None
        self.z: C = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: E = None
        self.w: A = None
        self.o: C = None
        self.p: C = None
        self.u: A = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.w: B = None
        self.z: C = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: E = None
        self.w: A = None
        self.o: C = None
        self.p: C = None
        self.u: A = None
        self.v: A = None
        self.txt = txt

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

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