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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.t: G = None
        self.z: F = None
        self.x: F = None
        self.y: J = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: D = None
        self.r: B = None
        self.p: C = None
        self.o: C = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.t: G = None
        self.z: F = None
        self.x: F = None
        self.y: J = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: D = None
        self.r: B = None
        self.p: C = None
        self.o: C = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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