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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.w: G = None
        self.p: A = None
        self.r: B = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.x: D = None
        self.t: E = None
        self.y: D = None
        self.txt = txt

f = A("f")
h = B("h")
n = C("n")
j = D("j")
g = E("g")
a = F("a")
l = G("l")

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.w: G = None
        self.p: A = None
        self.r: B = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.x: D = None
        self.t: E = None
        self.y: D = None
        self.txt = txt

f = A("f")
h = B("h")
n = C("n")
j = D("j")
g = E("g")
a = F("a")
l = G("l")

f.w = j
h.v = l
h.w = n
h.q = f
h.u = f
n.z = l
n.o = l
n.w = l
n.q = l
n.p = f
n.r = h
n.y = h
j.q = a
j.p = n
g.v = h
g.s = h
g.y = j
g.o = j
g.r = j
g.x = n
a.t = h
a.z = g
l.w = f
l.s = j
l.x = j
l.y = j
l.t = g
assert h.u.w.q.t.u.txt == "f"