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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.r: F = None
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.z: J = None
        self.v: A = None
        self.q: H = None
        self.o: G = None
        self.y: J = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: I = None
        self.o: J = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: A = None
        self.r: C = None
        self.z: B = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.r: F = None
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.z: J = None
        self.v: A = None
        self.q: H = None
        self.o: G = None
        self.y: J = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: I = None
        self.o: J = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: A = None
        self.r: C = None
        self.z: B = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.txt = txt

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

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

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