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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

k = A("k")
g = B("g")
m = C("m")
i = D("i")
c = E("c")
l = F("l")
a = G("a")
f = H("f")
n = E("n")
d = G("d")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

k = A("k")
g = B("g")
m = C("m")
i = D("i")
c = E("c")
l = F("l")
a = G("a")
f = H("f")
n = E("n")
d = G("d")

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