class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: G = None
        self.p: G = None
        self.x: H = None
        self.u: C = None
        self.r: C = None
        self.w: E = None
        self.t: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: G = None
        self.u: A = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: G = None
        self.p: G = None
        self.x: H = None
        self.u: C = None
        self.r: C = None
        self.w: E = None
        self.t: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: G = None
        self.u: A = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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