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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: B = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: C = None
        self.o: A = None
        self.u: C = None
        self.z: A = None
        self.x: G = None
        self.q: D = None
        self.txt = txt

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

m = A("m")
c = B("c")
k = C("k")
f = D("f")
n = E("n")
e = F("e")
h = G("h")

m.u = f
m.x = f
m.s = e
m.v = h
m.t = h
c.z = k
c.r = k
c.t = m
c.x = f
c.p = n
c.v = n
c.s = h
k.w = m
k.v = m
k.r = m
k.u = c
f.o = c
f.v = m
f.t = e
n.u = k
n.t = k
n.y = h
n.w = h
n.z = c
e.p = h
e.x = h
e.s = k
e.u = k
e.o = m
e.z = m
e.q = f
h.x = n
h.s = e
h.u = m
assert c.s.u.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.s: F = None
        self.v: G = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: B = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: C = None
        self.o: A = None
        self.u: C = None
        self.z: A = None
        self.x: G = None
        self.q: D = None
        self.txt = txt

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

m = A("m")
c = B("c")
k = C("k")
f = D("f")
n = E("n")
e = F("e")
h = G("h")

m.u = f
m.x = f
m.s = e
m.v = h
m.t = h
c.z = k
c.r = k
c.t = m
c.x = f
c.p = n
c.v = n
c.s = h
k.w = m
k.v = m
k.r = m
k.u = c
f.o = c
f.v = m
f.t = e
n.u = k
n.t = k
n.y = h
n.w = h
n.z = c
e.p = h
e.x = h
e.s = k
e.u = k
e.o = m
e.z = m
e.q = f
h.x = n
h.s = e
h.u = m
assert c.s.u.u.v.txt == "m"