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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: B = None
        self.q: E = None
        self.r: B = None
        self.v: E = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: C = None
        self.p: D = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

j = A("j")
k = B("k")
f = C("f")
c = D("c")
h = E("h")
a = F("a")
n = G("n")
e = B("e")
b = E("b")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: B = None
        self.q: E = None
        self.r: B = None
        self.v: E = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: C = None
        self.p: D = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

j = A("j")
k = B("k")
f = C("f")
c = D("c")
h = E("h")
a = F("a")
n = G("n")
e = B("e")
b = E("b")

j.w = n
j.o = b
j.x = c
k.o = a
k.q = a
f.y = a
f.v = c
c.x = f
h.z = b
h.q = b
h.v = b
h.o = e
h.r = e
h.s = e
a.p = b
a.o = c
a.w = n
a.y = n
a.s = j
n.q = c
n.p = c
n.t = f
n.z = f
n.u = f
e.o = a
e.q = a
b.z = h
b.q = h
b.v = h
b.o = k
b.r = k
b.s = k
assert a.o.x.y.p.z.q.r.txt == "k"