class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: B = None
        self.w: B = None
        self.z: F = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: E = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: B = None
        self.p: F = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: I = None
        self.w: F = None
        self.x: C = None
        self.u: A = None
        self.z: I = None
        self.r: I = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.z: F = None
        self.r: G = None
        self.v: C = None
        self.q: G = None
        self.t: B = None
        self.s: C = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: D = None
        self.s: A = None
        self.q: H = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: E = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: B = None
        self.p: F = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: I = None
        self.w: F = None
        self.x: C = None
        self.u: A = None
        self.z: I = None
        self.r: I = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.z: F = None
        self.r: G = None
        self.v: C = None
        self.q: G = None
        self.t: B = None
        self.s: C = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: D = None
        self.s: A = None
        self.q: H = None
        self.z: C = None
        self.txt = txt

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

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