class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: G = None
        self.w: I = None
        self.o: E = None
        self.p: D = None
        self.t: D = None
        self.z: B = None
        self.s: J = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: I = None
        self.r: D = None
        self.v: C = None
        self.y: J = None
        self.z: D = None
        self.q: A = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: E = None
        self.t: F = None
        self.z: B = None
        self.s: A = None
        self.w: A = None
        self.p: E = None
        self.x: C = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: B = None
        self.v: I = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.u: E = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: H = None
        self.s: F = None
        self.y: B = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

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

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

j.y = n
j.o = n
j.r = n
j.q = l
j.w = f
j.p = i
j.t = i
j.z = m
j.s = h
m.u = j
m.q = j
m.t = f
m.r = i
m.z = i
m.v = c
m.y = h
m.o = e
c.x = d
c.v = i
c.t = i
c.y = m
c.s = e
c.r = h
c.z = f
i.y = d
i.o = n
i.p = n
i.t = e
i.q = e
i.z = m
i.s = j
i.w = j
i.x = c
n.x = e
n.w = m
n.v = f
n.s = j
e.t = i
l.t = j
l.x = m
l.o = f
d.y = n
d.u = n
d.t = i
d.v = l
f.w = i
f.r = i
f.o = d
f.x = d
f.s = e
f.y = m
h.q = d
assert l.o.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: G = None
        self.w: I = None
        self.o: E = None
        self.p: D = None
        self.t: D = None
        self.z: B = None
        self.s: J = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: I = None
        self.r: D = None
        self.v: C = None
        self.y: J = None
        self.z: D = None
        self.q: A = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: E = None
        self.t: F = None
        self.z: B = None
        self.s: A = None
        self.w: A = None
        self.p: E = None
        self.x: C = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: B = None
        self.v: I = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.u: E = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: H = None
        self.s: F = None
        self.y: B = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

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

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

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