class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: I = None
        self.v: H = None
        self.x: E = None
        self.r: B = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: E = None
        self.q: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: G = None
        self.t: D = None
        self.s: G = None
        self.r: F = None
        self.y: H = None
        self.u: H = None
        self.q: D = None
        self.v: D = None
        self.txt = txt

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

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

l.y = f
l.s = k
l.v = j
l.x = m
l.r = c
l.z = c
l.t = c
c.s = k
c.p = m
c.q = i
f.u = l
f.x = h
h.s = d
h.t = i
h.y = k
m.u = d
m.x = h
m.w = h
a.r = j
a.p = l
d.v = m
d.w = l
j.p = m
k.w = l
k.x = d
k.s = d
k.t = h
k.q = h
k.v = h
k.r = a
k.y = j
k.u = j
i.z = f
i.s = m
i.y = d
i.t = c
assert c.p.x.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: I = None
        self.v: H = None
        self.x: E = None
        self.r: B = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: E = None
        self.q: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: G = None
        self.t: D = None
        self.s: G = None
        self.r: F = None
        self.y: H = None
        self.u: H = None
        self.q: D = None
        self.v: D = None
        self.txt = txt

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

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

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