class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: G = None
        self.t: F = None
        self.w: G = None
        self.r: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: C = None
        self.s: D = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

j = A("j")
i = B("i")
l = C("l")
k = D("k")
h = E("h")
m = F("m")
g = G("g")

j.p = l
j.v = g
j.w = g
j.t = m
j.x = m
j.r = k
i.q = l
i.p = j
l.s = k
k.y = i
h.w = k
h.s = k
h.z = l
h.x = j
h.v = j
m.t = l
m.v = l
m.y = g
g.s = m
g.q = k
g.p = h
g.v = h
assert k.y.q.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: G = None
        self.t: F = None
        self.w: G = None
        self.r: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: C = None
        self.s: D = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

j = A("j")
i = B("i")
l = C("l")
k = D("k")
h = E("h")
m = F("m")
g = G("g")

j.p = l
j.v = g
j.w = g
j.t = m
j.x = m
j.r = k
i.q = l
i.p = j
l.s = k
k.y = i
h.w = k
h.s = k
h.z = l
h.x = j
h.v = j
m.t = l
m.v = l
m.y = g
g.s = m
g.q = k
g.p = h
g.v = h
assert k.y.q.s.y.txt == "i"