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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: A = None
        self.s: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

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

m = A("m")
d = B("d")
a = C("a")
b = D("b")
l = E("l")
f = F("f")
h = G("h")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: A = None
        self.s: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

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

m = A("m")
d = B("d")
a = C("a")
b = D("b")
l = E("l")
f = F("f")
h = G("h")

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