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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.x: D = None
        self.s: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.v: A = None
        self.w: E = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.x: D = None
        self.s: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.v: A = None
        self.w: E = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

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