class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.o: F = None
        self.p: F = None
        self.t: B = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: E = None
        self.t: G = None
        self.y: D = None
        self.z: D = None
        self.r: E = None
        self.x: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: E = None
        self.t: G = None
        self.y: D = None
        self.z: D = None
        self.r: E = None
        self.x: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.z: A = None
        self.txt = txt

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

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