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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: A = None
        self.y: F = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

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

k = A("k")
f = B("f")
e = C("e")
j = D("j")
a = E("a")
m = F("m")
h = G("h")
l = F("l")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: A = None
        self.y: F = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

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

k = A("k")
f = B("f")
e = C("e")
j = D("j")
a = E("a")
m = F("m")
h = G("h")
l = F("l")

k.w = f
k.v = h
f.y = j
f.x = l
f.o = e
e.o = h
e.r = h
e.z = k
j.v = a
j.q = e
j.z = l
a.s = l
a.r = l
a.x = h
a.q = k
a.y = k
m.w = h
m.q = h
m.u = k
m.y = l
m.z = f
h.p = m
l.w = h
l.q = h
l.u = k
l.y = m
l.z = f
assert h.p.y.z.txt == "f"