class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.r: C = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.p: H = None
        self.t: A = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: D = None
        self.txt = txt

i = A("i")
c = B("c")
b = C("b")
d = D("d")
e = E("e")
k = F("k")
n = G("n")
m = H("m")
l = G("l")
f = F("f")

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.p: H = None
        self.t: A = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: D = None
        self.txt = txt

i = A("i")
c = B("c")
b = C("b")
d = D("d")
e = E("e")
k = F("k")
n = G("n")
m = H("m")
l = G("l")
f = F("f")

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