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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.o: G = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: G = None
        self.t: B = None
        self.q: D = None
        self.o: D = None
        self.p: B = None
        self.s: I = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.o: G = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: G = None
        self.t: B = None
        self.q: D = None
        self.o: D = None
        self.p: B = None
        self.s: I = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

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

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

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