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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: E = None
        self.z: H = None
        self.q: D = None
        self.s: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: G = None
        self.y: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: D = None
        self.p: E = None
        self.r: D = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: E = None
        self.z: H = None
        self.q: D = None
        self.s: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: G = None
        self.y: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: D = None
        self.p: E = None
        self.r: D = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

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

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