class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.p: E = None
        self.z: B = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: D = None
        self.s: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: F = None
        self.x: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.v: A = None
        self.q: G = None
        self.x: B = None
        self.p: B = None
        self.r: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: D = None
        self.s: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: F = None
        self.x: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.v: A = None
        self.q: G = None
        self.x: B = None
        self.p: B = None
        self.r: D = None
        self.txt = txt

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

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

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