class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: G = None
        self.o: D = None
        self.t: C = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: H = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: D = None
        self.u: J = None
        self.v: J = None
        self.s: I = None
        self.r: B = None
        self.x: B = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: E = None
        self.r: B = None
        self.v: H = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: H = None
        self.s: I = None
        self.v: F = None
        self.t: J = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: H = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: D = None
        self.u: J = None
        self.v: J = None
        self.s: I = None
        self.r: B = None
        self.x: B = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: E = None
        self.r: B = None
        self.v: H = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: H = None
        self.s: I = None
        self.v: F = None
        self.t: J = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: D = None
        self.txt = txt

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

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