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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: A = None
        self.s: F = None
        self.v: H = None
        self.x: B = None
        self.u: H = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.y: E = None
        self.q: D = None
        self.v: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: G = None
        self.r: E = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

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

l.y = i
l.s = c
l.u = c
l.o = a
l.q = a
l.x = e
e.s = i
e.q = c
g.w = e
g.x = e
g.q = l
g.s = n
g.v = i
g.u = i
g.o = i
a.y = b
a.w = n
b.r = e
b.v = i
n.w = a
n.x = a
n.q = a
n.v = a
n.y = f
n.r = b
c.y = g
c.v = n
i.z = f
i.w = c
i.x = c
i.r = b
i.u = e
f.r = e
f.v = i
assert b.r.q.y.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: G = None
        self.o: D = None
        self.u: G = None
        self.x: B = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: A = None
        self.s: F = None
        self.v: H = None
        self.x: B = None
        self.u: H = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.y: E = None
        self.q: D = None
        self.v: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: G = None
        self.r: E = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

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

l.y = i
l.s = c
l.u = c
l.o = a
l.q = a
l.x = e
e.s = i
e.q = c
g.w = e
g.x = e
g.q = l
g.s = n
g.v = i
g.u = i
g.o = i
a.y = b
a.w = n
b.r = e
b.v = i
n.w = a
n.x = a
n.q = a
n.v = a
n.y = f
n.r = b
c.y = g
c.v = n
i.z = f
i.w = c
i.x = c
i.r = b
i.u = e
f.r = e
f.v = i
assert b.r.q.y.q.q.txt == "a"