class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.v: H = None
        self.q: J = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.z: B = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.x: J = None
        self.u: C = None
        self.y: H = None
        self.r: G = None
        self.q: J = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: J = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: B = None
        self.o: I = None
        self.r: B = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: G = None
        self.r: D = None
        self.z: E = None
        self.t: H = None
        self.p: B = None
        self.w: B = None
        self.txt = txt

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

f.w = i
f.t = k
f.v = b
f.q = d
f.r = c
j.u = a
c.u = f
c.p = a
c.z = j
c.w = l
a.r = h
h.q = d
h.w = k
h.v = b
i.v = c
i.u = c
i.p = a
i.z = a
i.x = d
i.q = d
i.y = b
i.r = k
k.w = a
k.r = d
k.v = c
b.z = k
b.x = k
b.p = j
b.r = j
b.o = l
l.x = f
d.u = h
d.z = h
d.x = k
d.r = a
d.t = b
d.p = j
d.w = j
assert c.p.r.q.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.v: H = None
        self.q: J = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.z: B = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.x: J = None
        self.u: C = None
        self.y: H = None
        self.r: G = None
        self.q: J = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: J = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: B = None
        self.o: I = None
        self.r: B = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: G = None
        self.r: D = None
        self.z: E = None
        self.t: H = None
        self.p: B = None
        self.w: B = None
        self.txt = txt

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

f.w = i
f.t = k
f.v = b
f.q = d
f.r = c
j.u = a
c.u = f
c.p = a
c.z = j
c.w = l
a.r = h
h.q = d
h.w = k
h.v = b
i.v = c
i.u = c
i.p = a
i.z = a
i.x = d
i.q = d
i.y = b
i.r = k
k.w = a
k.r = d
k.v = c
b.z = k
b.x = k
b.p = j
b.r = j
b.o = l
l.x = f
d.u = h
d.z = h
d.x = k
d.r = a
d.t = b
d.p = j
d.w = j
assert c.p.r.q.u.w.txt == "k"