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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.v: C = None
        self.y: C = None
        self.o: I = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

c = A("c")
a = B("a")
j = C("j")
d = D("d")
k = E("k")
g = F("g")
f = G("f")
b = H("b")
n = I("n")
l = J("l")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.v: C = None
        self.y: C = None
        self.o: I = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

c = A("c")
a = B("a")
j = C("j")
d = D("d")
k = E("k")
g = F("g")
f = G("f")
b = H("b")
n = I("n")
l = J("l")

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