class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: G = None
        self.x: C = None
        self.y: H = None
        self.w: F = None
        self.s: G = None
        self.p: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: G = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: D = None
        self.s: D = None
        self.p: B = None
        self.q: A = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: A = None
        self.r: B = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: G = None
        self.u: H = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: G = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: D = None
        self.s: D = None
        self.p: B = None
        self.q: A = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: A = None
        self.r: B = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: G = None
        self.u: H = None
        self.w: G = None
        self.txt = txt

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

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