class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: E = None
        self.s: E = None
        self.x: E = None
        self.z: E = None
        self.u: H = None
        self.o: C = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: G = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: E = None
        self.u: H = None
        self.t: B = None
        self.v: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.u: A = None
        self.o: D = None
        self.q: A = None
        self.y: B = None
        self.r: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: G = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: E = None
        self.u: H = None
        self.t: B = None
        self.v: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.u: A = None
        self.o: D = None
        self.q: A = None
        self.y: B = None
        self.r: H = None
        self.txt = txt

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

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