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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: H = None
        self.r: A = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: C = None
        self.w: D = None
        self.v: D = None
        self.p: G = None
        self.q: D = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: H = None
        self.r: A = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: C = None
        self.w: D = None
        self.v: D = None
        self.p: G = None
        self.q: D = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

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

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