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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.p: C = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

d = A("d")
n = B("n")
g = C("g")
k = D("k")
f = E("f")
h = F("h")
c = C("c")
i = D("i")
l = F("l")
j = C("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.p: C = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

d = A("d")
n = B("n")
g = C("g")
k = D("k")
f = E("f")
h = F("h")
c = C("c")
i = D("i")
l = F("l")
j = C("j")

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