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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: B = None
        self.p: B = None
        self.r: J = None
        self.t: F = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: F = None
        self.v: H = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: B = None
        self.w: B = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: B = None
        self.p: B = None
        self.r: J = None
        self.t: F = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: F = None
        self.v: H = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: H = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: B = None
        self.w: B = None
        self.x: B = None
        self.txt = txt

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

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