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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: E = None
        self.p: B = None
        self.o: G = None
        self.z: E = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: C = None
        self.v: E = None
        self.y: D = None
        self.u: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: E = None
        self.p: B = None
        self.o: G = None
        self.z: E = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: C = None
        self.v: E = None
        self.y: D = None
        self.u: D = None
        self.t: G = None
        self.txt = txt

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

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

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