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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: C = None
        self.y: B = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.t: B = None
        self.r: A = None
        self.p: J = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: C = None
        self.o: A = None
        self.x: G = None
        self.v: A = None
        self.s: E = None
        self.t: F = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.w: C = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: C = None
        self.y: B = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.t: B = None
        self.r: A = None
        self.p: J = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: C = None
        self.o: A = None
        self.x: G = None
        self.v: A = None
        self.s: E = None
        self.t: F = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.w: C = None
        self.s: C = None
        self.txt = txt

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

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