class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.s: D = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: D = None
        self.p: D = None
        self.w: D = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.y: D = None
        self.s: D = None
        self.x: F = None
        self.w: B = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: A = None
        self.u: C = None
        self.p: F = None
        self.v: D = None
        self.w: C = None
        self.q: E = None
        self.txt = txt

n = A("n")
f = B("f")
c = C("c")
b = D("b")
h = E("h")
j = F("j")
k = G("k")
i = D("i")

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: D = None
        self.p: D = None
        self.w: D = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.y: D = None
        self.s: D = None
        self.x: F = None
        self.w: B = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: A = None
        self.u: C = None
        self.p: F = None
        self.v: D = None
        self.w: C = None
        self.q: E = None
        self.txt = txt

n = A("n")
f = B("f")
c = C("c")
b = D("b")
h = E("h")
j = F("j")
k = G("k")
i = D("i")

n.u = j
n.t = k
n.s = b
n.x = c
f.w = h
c.u = h
c.z = b
c.p = b
c.w = i
c.q = k
b.w = c
b.q = n
h.u = c
h.p = k
h.y = i
h.s = i
h.x = j
h.w = f
h.r = n
j.r = c
j.z = f
j.x = f
j.u = k
j.s = h
k.x = h
k.q = h
k.y = n
k.u = c
k.w = c
k.p = j
k.v = i
i.w = c
i.q = n
assert j.r.w.w.q.y.s.w.txt == "c"